package com.seven.config;

import com.seven.component.LoginHandlerInterceptor;
import com.seven.component.MyLocaleResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author seven
 * @Date 2020/4/27 13:08
 * spring Boot config类 代替xml配置
 **/
@Configuration
public class MyMvcConfig {
    @Bean //将组件注册在容器
    public WebMvcConfigurer webMvcConfigurerAdapter(){
        return new MyWebMvcConfigurer();
    }
    @Bean
    public LocaleResolver localeResolver(){
        return new MyLocaleResolver();
    }
}
